Skip to content

Conversation

@ThomasCode92
Copy link
Owner

@ThomasCode92 ThomasCode92 commented Jul 10, 2025

✨ Enhance File & Folder Modeling in Database

📝 Summary

This PR improves the modeling of files and folders within the database. It introduces two new fields—createdAt and ownerId—to both the File and Folder tables. Additionally, it ensures that files are uploaded into the currently open folder by correctly passing the folder ID as the parent reference during uploads.

🔧 What's Added

  • 🗂️ Added createdAt and ownerId fields to both File and Folder tables.
  • 📂 Updated the file upload logic to:
    • Automatically assign the current open folder as the file’s parent.
    • Maintain proper folder hierarchy on upload.

✅ Benefits

  • 🔐 Better user-level access control with the ownerId field.
  • 🕓 Improved traceability of file/folder creation using createdAt.
  • 📁 More intuitive file organization by respecting the currently open folder on upload.

@netlify
Copy link

netlify bot commented Jul 10, 2025

Deploy Preview for t4s-drive-tutorial ready!

Name Link
🔨 Latest commit 83a0be1
🔍 Latest deploy log https://app.netlify.com/projects/t4s-drive-tutorial/deploys/686f60ade57bbd000837a830
😎 Deploy Preview https://deploy-preview-9--t4s-drive-tutorial.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ThomasCode92 ThomasCode92 merged commit 442d632 into main Jul 13, 2025
5 checks passed
@ThomasCode92 ThomasCode92 deleted the modeling-files-in-db branch July 13, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants